namespace Brjnk.GpxExplorer.Data.ImportExport
{
    using System;
    using System.Collections.Generic;
    using System.IO;

    /// <summary>
    /// </summary>
    public interface IDataReader
    {
        DataReaderResult Load(Stream data);
    }

    public class DataReaderResult
    {
        public DataReaderResult(IEnumerable<Waypoint> waypoints, IEnumerable<Route> routes, IEnumerable<Track> tracks, string message, Exception ex)
        {
            this.Waypoints = waypoints;
            this.Routes = routes;
            this.Tracks = tracks;
            this.Message = message;
            this.Exception = ex;
        }

        public DataReaderResult(Exception ex)
        {
            this.Exception = ex;
        }

        public IEnumerable<Waypoint> Waypoints { get; private set; }

        public IEnumerable<Route> Routes { get; private set; }

        public IEnumerable<Track> Tracks { get; private set; }

        public Exception Exception { get; private set; }

        public string Message { get; private set; }
    }
}